/********************************************************************
 
 Copyright (C), 2012年 dhc. All rights reserved.
 
 Filename: 	    MailFriendList.m
 
 Author:        muzongcun
 
 Version:       1.0
 
 Description:   MailFriendList
 
 History:
 
 muzongcun    2012/3/10     1.0     Create
 
 *********************************************************************/

#import <UIKit/UIKit.h>
#import "UserTaskDelegate.h"
#import "EGORefreshTableFooterView.h"
#import "EGORefreshTableHeaderView.h"

@protocol MailFriendListDelegate

-(void)addMailContact:(id)obj;

@end


@interface MailFriendList :UIViewController <UITableViewDelegate,UITableViewDataSource,UISearchBarDelegate,EGORefreshTableFooterDelegate, UserTaskDelegate, EGORefreshTableHeaderDelegate,UISearchDisplayDelegate, UISearchBarDelegate>
{
    BOOL _bIsLoading;
	UITableView*                    m_listTV;
	UISearchBar*                    m_searchBar;
	UIButton*                       m_moreBtn;          //更多button
	NSMutableArray*                 m_contentArray;	
    UINavigationBar*                m_navBar;
    NSString *                      m_searchScopeType;  //查找不同的类型（发件人和邮件标题）
    BOOL                            m_bIsSearching;     //是否进程查找
    NSString*                       m_searchText;
	id<MailFriendListDelegate>      m_mailFriendListDelegate;
    UISearchDisplayController*      m_searchDisplayController;
    
    EGORefreshTableHeaderView *     _refreshHeaderView;
    EGORefreshTableFooterView *     _refreshFooterView; 
}
@property (nonatomic,assign) UITableView*                  m_listTV;
@property (nonatomic,assign) UINavigationBar*              m_navBar;
@property (nonatomic,retain) UISearchBar*                  m_searchBar;
@property (nonatomic,retain) NSMutableArray*               m_contentArray;
@property (nonatomic,assign) BOOL                          m_bIsSearching;
@property (nonatomic,assign) NSString *                    m_searchScopeType;  
@property (nonatomic,retain) EGORefreshTableHeaderView *   _refreshHeaderView;
@property (nonatomic,retain) EGORefreshTableFooterView *   _refreshFooterView;
@property (nonatomic,assign) id<MailFriendListDelegate>    m_mailFriendListDelegate;
@property (nonatomic,assign) UISearchDisplayController*    m_searchDisplayController;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;

- (void)doSearch;
- (void) refreshData;
#ifdef _TEXT
- (NSMutableArray*)readClientList;
#endif
- (void)showMoreContact:(id)sender;
- (void)cancelSelected:(id)sender;
@end
